<?php 
use yii\web\UrlManager;

?>
			<!-- #section:basics/sidebar -->
			<div id="sidebar" class="sidebar                  responsive">
				<script type="text/javascript">
					try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
				</script>

				<div class="sidebar-shortcuts" id="sidebar-shortcuts">
					<div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
						<button class="btn btn-success">
							<i class="ace-icon fa fa-signal"></i>
						</button>

						<button class="btn btn-info">
							<i class="ace-icon fa fa-pencil"></i>
						</button>

						<!-- #section:basics/sidebar.layout.shortcuts -->
						<button class="btn btn-warning">
							<i class="ace-icon fa fa-users"></i>
						</button>

						<button class="btn btn-danger">
							<i class="ace-icon fa fa-cogs"></i>
						</button>

						<!-- /section:basics/sidebar.layout.shortcuts -->
					</div>

					<div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
						<span class="btn btn-success"></span>

						<span class="btn btn-info"></span>

						<span class="btn btn-warning"></span>

						<span class="btn btn-danger"></span>
					</div>
				</div><!-- /.sidebar-shortcuts -->

				<ul class="nav nav-list">
					<li class="">
						<a href="<?=Yii::$app->urlManager->createUrl(['main/index']) ?>">
							<i class="menu-icon fa fa-tachometer"></i>
							<span class="menu-text"> 首页</span>
						</a>

						<b class="arrow"></b>
					</li>
				<?php
					 if(Yii::$app->session->get('RoleName')=="系统管理员" || Yii::$app->session->get('RoleName')=="商品管理员"){
						echo "<li class=\"\">
						<a href=\"#\" class=\"dropdown-toggle\">
							<i class=\"menu-icon fa fa-tag\"></i>
							<span class=\"menu-text\"> 商品管理 </span>

							<b class=\"arrow fa fa-angle-down\"></b>
						</a>

						<b class=\"arrow\"></b>

						<ul class=\"submenu\">
						<li class=\"\">
								<a href=\"".Yii::$app->urlManager->createUrl(['merchandis/index'])."\">
									<i class=\"menu-icon fa fa-caret-right\"></i>
									 商品信息管理
								</a>

								<b class=\"arrow\"></b>
							</li>
						
							<li class=\"\">
								<a href=\"".Yii::$app->urlManager->createUrl(['merchandis/merchandissort'])."\">
									<i class=\"menu-icon fa fa-caret-right\"></i>
									 商品分类管理
								</a>

								<b class=\"arrow\"></b>
							</li>

							<li class=\"\">
								<a href=\"".Yii::$app->urlManager->createUrl(['merchandis/prostatus'])."\">
									<i class=\"menu-icon fa fa-caret-right\"></i>
									商品促销管理
								</a>

								<b class=\"arrow\"></b>
							</li>

							<li class=\"\">
								<a href=\"".Yii::$app->urlManager->createUrl(['merchandis/unitinfo'])."\">
									<i class=\"menu-icon fa fa-caret-right\"></i>
									商品单位字典管理
								</a>

								<b class=\"arrow\"></b>
							</li>							
						</ul>
					</li>";
					}
				?>
				<?php 
					if(Yii::$app->session->get('RoleName')=="系统管理员" || Yii::$app->session->get('RoleName')=="入库管理员"){
						echo "<li class=\"\">
						<a href=\"#\" class=\"dropdown-toggle\">
							<i class=\"menu-icon fa fa-list\"></i>
							<span class=\"menu-text\"> 入库管理 </span>

							<b class=\"arrow fa fa-angle-down\"></b>
						</a>

						<b class=\"arrow\"></b>

						<ul class=\"submenu\">
							<li class=\"\">
								<a href=\"?r=purchase/index\">
									<i class=\"menu-icon fa fa-caret-right\"></i>
									库存列表
								</a>

								<b class=\"arrow\"></b>
							</li>

							<li class=\"\">
								<a href=\"?r=purchase/addinfo&tableid=1\">
									<i class=\"menu-icon fa fa-caret-right\"></i>
									添加库存
								</a>

								<b class=\"arrow\"></b>
							</li>
							
							<li class=\"\">
								<a href=\"?r=purchase/supplier\">
									<i class=\"menu-icon fa fa-caret-right\"></i>
									供应商管理
								</a>

								<b class=\"arrow\"></b>
							</li>
						</ul>
					</li>";
					}
				?>	
				<?php 
					if(Yii::$app->session->get('RoleName')=="系统管理员" || Yii::$app->session->get('RoleName')=="订单管理员"){
						echo "<li class=\"\">
						<a href=\"\" class=\"dropdown-toggle\">
							<i class=\"menu-icon fa fa-pencil-square-o\"></i>
							<span class=\"menu-text\"> 订单管理 </span>
							<b class=\"arrow fa fa-angle-down\"></b>							
						</a>
						<b class=\"arrow\"></b>
						<ul class=\"submenu\">
							<li class=\"\">
								<a href=\"".Yii::$app->urlManager->createUrl(['order/index'])."\">
									<i class=\"menu-icon fa fa-caret-right\"></i>
									订单管理
								</a>

								<b class=\"arrow\"></b>
							</li>
							<li class=\"\">
								<a href=\"".Yii::$app->urlManager->createUrl(['deliveryinfo/index'])."\">
									<i class=\"menu-icon fa fa-caret-right\"></i>
									配送商管理
								</a>

								<b class=\"arrow\"></b>
							</li>
						</ul>

					</li>";
					}
				?>	
				<?php 
					if(Yii::$app->session->get('RoleName')=="系统管理员" || Yii::$app->session->get('RoleName')=="报表管理员"){
						echo "<li class=\"\">
						<a href=\"\" class=\"dropdown-toggle\" >
							<i class=\"menu-icon fa fa-list-alt\"></i>
							<span class=\"menu-text\"> 统计报表 </span>
							<b class=\"arrow fa fa-angle-down\"></b>
						</a>

						<b class=\"arrow\"></b>
						<ul class=\"submenu\">
							<li class=\"\">
								<a href=\"".Yii::$app->urlManager->createUrl(['report/index'])."\">
									<i class=\"menu-icon fa fa-caret-right\"></i>
									统计报表
								</a>

								<b class=\"arrow\"></b>
							</li>
						</ul>
					</li>";
					}
				?>	
				<?php 
					if(Yii::$app->session->get('RoleName')=="系统管理员" || Yii::$app->session->get('RoleName')=="用户管理员"){
						echo "<li class=\"\">

							<a href=\"#\" class=\"dropdown-toggle\">
								<i class=\"menu-icon fa fa-list\"></i>
								<span class=\"menu-text\"> 会员管理</span>
	
								<b class=\"arrow fa fa-angle-down\"></b>
							</a>
						
	
							<b class=\"arrow\"></b>
	
							<ul class=\"submenu\">
								<li class=\"\">
									<a href=\"".Yii::$app->urlManager->createUrl(['membermanage/addmember'])."\">
										<i class=\"menu-icon fa fa-caret-right\"></i>
										前台会员管理
									</a>
								<b class=\"arrow\"></b>
								</li>	
									<b class=\"arrow\"></b>								
							</ul>
						</li>";
					}
				?>
				<?php 
					if(Yii::$app->session->get('RoleName')=="系统管理员"){
						echo "<li class=\"\">
									<a href=\"#\" class=\"dropdown-toggle\">
										<i class=\"menu-icon fa fa-list\"></i>
										<span class=\"menu-text\"> 后台账号管理</span>
			
										<b class=\"arrow fa fa-angle-down\"></b>
									</a>
			
									<b class=\"arrow\"></b>
			
									<ul class=\"submenu\">
										<li class=\"\">
											<a href=\"".Yii::$app->urlManager->createUrl(['operator/add'])."\">
												<i class=\"menu-icon fa fa-caret-right\"></i>
												操作员管理
											</a>
			
											<b class=\"arrow\"></b>
										</li>
			
											<b class=\"arrow\"></b>
										<li class=\"\">
											<a href=\"".Yii::$app->urlManager->createUrl(['rbac/addrole'])."\">
												<i class=\"menu-icon fa fa-caret-right\"></i>
												角色管理
											</a>
			
											<b class=\"arrow\"></b>
										</li>
										<li class=\"\">
											<a href=\"".Yii::$app->urlManager->createUrl(['rbac/addoperation'])."\">
												<i class=\"menu-icon fa fa-caret-right\"></i>
												添加权限
											</a>
			
											<b class=\"arrow\"></b>
										</li>
										<li class=\"\">
											<a href=\"".Yii::$app->urlManager->createUrl(['rbac/authassign'])."\">
												<i class=\"menu-icon fa fa-caret-right\"></i>
												角色授权
											</a>
			
											<b class=\"arrow\"></b>
										</li>
									</ul>
								</li>";
							}
						
						?>	

					<?php 
						if(Yii::$app->session->get('RoleName')=="系统管理员" || Yii::$app->session->get('RoleName')=="日志管理员"){
							echo "<li class=\"\">
								<a href=\"calendar.html\">
									<i class=\"menu-icon fa fa-calendar\"></i>
		
									<span class=\"menu-text\">
										操作日志									
									</span>
								</a>
		
								<b class=\"arrow\"></b>
							</li>";
						}
					
					?>
			</ul><!-- /.nav-list -->

				<!-- #section:basics/sidebar.layout.minimize -->
				<div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
					<i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
				</div>

				<!-- /section:basics/sidebar.layout.minimize -->
				<script type="text/javascript">
					try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
				</script>
			</div>

			<!-- /section:basics/sidebar -->
